<{capture name="header"}>
<style>
body,body div{
	background:#333333!important;
	
} 
#dly_printer{
	height:<{$prt_tmpl.prt_tmpl_height*$dpi/25.4}>px;
	width:<{$prt_tmpl.prt_tmpl_width*$dpi/25.4}>px; 
	border:10px #fff solid;
	margin:0 auto; 
	background:#fff!important;
}
</style>
<{/capture}>



<{capture name="footbar"}>
<center style="background:#fff!important;border-top:1px #000 solid;padding:5px;">
<{button label="返回编辑" type="button" onclick="window.history.go(-1);"}>
<{button label="打印快递单" type="button" id="swf_submit" class="btn-primary"}>
</center>
<{/capture}>

<textarea id="print_data" style="display:none">
   <{$data}>
</textarea>

<div id="dly_printer">
   loading...
</div>



<script>
var swf = new Swiff('<{$res_url}>/images/printermode.swf?<{$smarty.now}>', {
	width:  '100%',
	height: '100%',
	params:{wMode:false},
	id:'dly_printer_flash',
	container: $('dly_printer'),
	vars:{
		xml:'<{$prt_tmpl.prt_tmpl_data}>',
		
		data:$('print_data').value<{if $bg_id}>,bg:'index.php?app=express&ctl=admin_delivery_printer&act=show_picture&p[0]=1&p[1]=<{$bg_id}>'<{/if}>,
		
		order_number:1,
        
        print_test:'false',
        
        offset_y:'<{$prt_tmpl.prt_tmpl_offsety|default:0}>',
        
        offset_x:'<{$prt_tmpl.prt_tmpl_offsetx|default:0}>',
        
        page_w:'<{$prt_tmpl.prt_tmpl_width}>',
        
        page_h:'<{$prt_tmpl.prt_tmpl_height}>',
	
		copyright:'shopex'
	}
});

$("swf_submit").addEvent("click",function() {
	$('dly_printer_flash').doPrint();
});
</script>
